package com.mediaFeed.service.impl;

import com.mediaFeed.service.VideoManager;
import com.mediaFeed.dao.VideoDao;
import com.mediaFeed.model.Video;

import java.util.List;

/**
 * Author:Louis Majanja <louis@media.berkeley.edu>
 * Date: Nov 13, 2006
 * Time: 4:42:27 PM
 */
public class VideoManagerImpl extends BaseManager implements VideoManager{

    private VideoDao dao;

    public void setVideoDao(VideoDao dao) {
        this.dao = dao;
    }

    public Video getVideo(String videoId) {
        return dao.getVideo(new Long(videoId));
    }

    public List getVideos(Video video) {
        return dao.getVideo(video);
    }

    public void saveVideo(Video video) {
        dao.saveVideo(video);
    }

    public void removeVideo(String videoId) {
         if (log.isDebugEnabled()) {
            log.debug("removing video: " + videoId);
        }
        dao.removeVideo(new Long(videoId));
    }
}
